home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / texdraw / compact / txdps.tex < prev    next >
Text File  |  1992-07-06  |  2KB  |  46 lines

  1. % TeXdraw macros to access PostScript builtins
  2.  
  3. % $Id: txdps.tex,v 1.6 1992/07/07 14:40:40 kabal Rel $
  4.  
  5. %   Copyright (C) 1991, 1992  Peter Kabal
  6.  
  7. % The routines in this file are provided free of charge without
  8. % warranty of any kind.  Note that the TeXdraw routines are copyrighted.
  9. % They may be distributed freely provided that the recipients also
  10. % acquire the right to distribute them freely.  The notices to this
  11. % effect must be preserved when the files are distributed.
  12.  
  13. %  Peter Kabal
  14. %  Department of Electrical Engineering
  15. %  McGill University
  16. %  3480 University
  17. %  Montreal, Quebec
  18. %  Canada  H3A 2A7
  19.  
  20. %  kabal@aldebaran.EE.McGill.CA
  21. \chardef\catamp=\the\catcode`\@
  22. \catcode`\@=11
  23. \def\PSsetlinecap #1 {\writeps{#1 setlinecap}}
  24. \def\PSsetlinejoin #1 {\writeps{#1 setlinejoin}}
  25. \def\PSstroke {\writeps{stroke}}
  26. \def\PSnewpath {\writeps{newpath}}
  27. \def\PSclosepath {\writeps{closepath}}
  28. \def\PSfill {\writeps{fill}}
  29. \def\PSlineto (#1 #2){\getpos (#1 #2)\a@rgx\a@rgy
  30. \s@etpospix \a@rgx \a@rgy
  31. \writeps {\the\x@pix\space \the\y@pix\space lineto}}
  32. \def\PSmoveto (#1 #2){\getpos (#1 #2)\a@rgx\a@rgy
  33. \s@etpospix \a@rgx \a@rgy
  34. \writeps {\the\x@pix\space \the\y@pix\space moveto}}
  35. \def\PSarc r:#1 sd:#2 ed:#3 (#4 #5){\getpos (#4 #5)\a@rgx\a@rgy
  36. \s@etpospix \a@rgx \a@rgy
  37. \coordtopix {#1}\t@pixa
  38. \writeps{\the\x@pix\space \the\y@pix\space
  39. \the\t@pixa\space #2 #3 arc}}
  40. \def\PSarcn r:#1 sd:#2 ed:#3 (#4 #5){\getpos (#4 #5)\a@rgx\a@rgy
  41. \s@etpospix \a@rgx \a@rgy
  42. \coordtopix {#1}\t@pixa
  43. \writeps{\the\x@pix\space \the\y@pix\space
  44. \the\t@pixa\space #2 #3 arcn}}
  45. \catcode`\@=\catamp
  46.